package com.xiaocai.myblog.enums;

/**
 * @author chenhefu
 * @date 2019-09-30 18:11
 */
public enum ErrorCodeEnum {
    /**
     * 服务端错误
     */
    SERVER_ERROR(1000, "服务端错误"),
    /**
     * 参数错误
     */
    SERVER_ERROR_PARAM(2000, "参数错误"),
    /**
     * 业务异常
     */
    BUSINESS_ERROR(3000,"业务异常"),

    /**
     * 网络异常
     */
    NETWORK_ERROR(4000, "网络异常");

        String msg;
        int code;

        ErrorCodeEnum(int code, String msg){
            this.msg = msg;
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public int getCode() {
            return code;
        }

}
